﻿namespace _2.AbstractFactoryPattern.Pattern
{
    internal class SharpFactory : BaseAbstractFactory
    {
        public override IShape GetSharp(string sharp)
        {
            IShape product = null;
            switch (sharp)
            {
                case "Rect":
                    product = new Rect();
                    break;
                case "Circle":
                    product = new Circle();
                    break;
                case "Square":
                    product = new Square();
                    break;
                default:
                    break;
            }

            return product;
        }

        public override IColor GetColor(string color)
        {
            return null;
        }
    }

    internal class ColorFactory : BaseAbstractFactory
    {
        public override IShape GetSharp(string sharp)
        {
            return null;
        }

        public override IColor GetColor(string color)
        {
            IColor product = null;
            switch (color)
            {
                case "Red":
                    product = new RedColor();
                    break;
                case "Green":
                    product = new GreenColor();
                    break;
                case "Blue":
                    product = new BlueColor();
                    break;
                default:
                    break;
            }

            return product;
        }
    }
}
